package day5;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class Avg53 {
    //输入负数，结束，用return 结束
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int total = 0;

        for (int i = 1; i <= 5; i++) {
            System.out.println("请输入：");
            int h = sc.nextInt();
            if (h < 0) {
                System.out.println("输入错误！");
                return;
            }
            total += h;
        }

        int avg = total / 5;
        System.out.println("平均分是：" + avg);


    }
}
